﻿using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;

namespace Pixysoft.Weblications.Sango.Protocol.player
{
    public interface player_tactical
    {
        string name { get;set;}
        long tacticaltypecode { get;set;}
        long level { get;set;}

        string description { get;set;}
        double value { get;set;}

        bool isdefault { get;set;}
        List<player_tacticalpos> positions { get;set;}
    }

    public interface player_tacticalpos
    {
        long positionindex { get;set;}
        string officerprimarycode { get;set;}
        bool isopen { get;set;}
    }

    /// <summary>
    /// 前端传送服务器，需要对象序列化，所以有下面2个对象
    /// </summary>
    public class player_tactical_o
    {
        string name;
        long tacticaltypecode;
        long level;

        bool isdefault;
        List<player_tacticalpos_o> positions = new List<player_tacticalpos_o>();

        [JsonProperty("name")]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        [JsonProperty("tacticaltypecode")]
        public long Tacticaltypecode
        {
            get { return tacticaltypecode; }
            set { tacticaltypecode = value; }
        }
        [JsonProperty("level")]
        public long Level
        {
            get { return level; }
            set { level = value; }
        }
        [JsonProperty("isdefault")]
        public bool Isdefault
        {
            get { return isdefault; }
            set { isdefault = value; }
        }
        [JsonProperty("positions")]
        public List<player_tacticalpos_o> Positions
        {
            get { return positions; }
            set { positions = value; }
        }


    }

    public class player_tacticalpos_o
    {
        long positionindex;
        string officerprimarycode;
        bool isopen = false;

        [JsonProperty("positionindex")]
        public long Positionindex
        {
            get { return positionindex; }
            set { positionindex = value; }
        }
        [JsonProperty("officerprimarycode")]
        public string Officerprimarycode
        {
            get { return officerprimarycode; }
            set { officerprimarycode = value; }
        }
        [JsonProperty("isopen")]
        public bool Isopen
        {
            get { return isopen; }
            set { isopen = value; }
        }

    }

}
